<?php

namespace home;

use \core\Controller;

class Index extends Controller
{
    public function index($name = "hello world", $age = 0)
    {
        // dump($_SERVER, false);
        // $name = dump(M('test')->select(), true, "test table: ");
        // $this->assign('name', $name);
        $this->assign('age', $age);
        $this->assign('title', $age);
        $this->assign('data', M('test')->select());
        $this->display();
        // $this->display('string:<h1>{$name}: {$age}</h1>');
    }

    public function content()
    {
        $this->assign('title', "Content");
        $this->assign('data', array(1, 2, 3, 4, 5, 6, 7, 8, 9));
        $this->display();
    }

    public function run()
    {
        dump("runing!!.....", false);
    }
}
